<!DOCTYPE html>
<!--v1.6.7.2 RDPROJECT-510 cx 2013-12-10 start  -->
<html>
<#include "../head.html">
    <body>
    <table class="mc">
        <tr>
            <td class="mc-l">
                <!--左侧导航---{-->
                <div id="navPanelContainer">
                    <div class="system-logo cd"></div>
                    <!--管理员信息---{-->
                    <#include "../adminInfo.html">
                        <!--管理员信息---}-->
                        <div class="nav-wrap">
                            <#include "left.html">
                        </div>
                </div>
                <!--左侧导航---}-->
            </td>
            <td class="mc-m">
                <div class="navToggle"></div>
            </td>
            <td class="mc-r">
                <!--顶部导航---{-->
                <#include "../topNav.html">
                    <!--顶部导航---}-->

                    <!--面包屑导航---{-->
                    <#assign moduleName="好友邀请统计报表">
                        <#include "banner.html">
                            <!--面包屑导航---}-->
							
						<#if param?exists>
							<#if param.get("username")?exists><#assign username=param.get("username")></#if>
							<#if param.get("invite_username")?exists><#assign invite_username=param.get("invite_username")></#if>
							<#if param.get("invite_startTime")?exists><#assign invite_startTime=param.get("invite_startTime")></#if>
							<#if param.get("invite_endTime")?exists><#assign invite_endTime=param.get("invite_endTime")></#if>
						</#if>
                            <!--工具栏--{-->
                            <div id="toolbar" class="clearfix">
								<div class="toolbor-module export">
                                    <input type="button" onClick="exportxls()" value="导出报表" class="input-button export-btn"/>   
                                </div>
                                    <div class="toolbor-module search">
			                        <div style="height:22px;line-height:22px;float:left;">邀请时间：</div>
			                        <input class="_search-value js-datetime" name="invite_startTime" id="invite_startTime" value="${invite_startTime!}"  size="15"/>
			                        <div style="height:22px;line-height:22px;float:left;margin:0 8px;"> 到 </div>
			                        <input class="_search-value js-datetime" name="invite_endTime" id="invite_endTime"  value="${invite_endTime!}" size="15"/>
			                       	 <input type="button" value="搜索"  class="input-button" onclick="sousuo();">
			                        </div>   
                                     <div class="toolbor-module search">
                                    <div style="height:22px;line-height:22px;float:left;">邀请人：</div>
                                    <input type="text" name="invite_username" id="invite_username" value=""  class="search-value">
                                    </div>
                                    <div class="toolbor-module search">
			                         <div style="height:22px;line-height:22px;float:left;">被邀请人：</div>
                                    <input type="text" name="username" id="username" value=""  class="search-value">
                                    </div>
                                </div>

                            </div>
                            <!--工具栏--}-->

                            <div id="main" class="clearfix">
                                <form action="" method="post">
                                    <table class="data-list">
                                        <tr class="header">
                                            <td>邀请人</td>
                                            <td>被邀请人</td>
                                            <td>邀请时间</td>
                                            <td>已优惠利息管理费总额</td>
                                        </tr>
                                        <#list  list as item>
                                            <tr class="s">
                                                <td>${item.invite_username!}</td>
                                                <td>${item.username!}</td>
                                                <td>${dateformat(item.addtime!"")}</td>
                                                <td>${item.perferTotalMoney!"0"}元</td>
                                            </tr>
                                        </#list>
                                    </table>
                                </form>

                                <!--底部工具栏--{-->
                                <div id="bottomToolbar" class="clearfix">
                                    <div class="other-tool">
                                        <dl class="refresh-data">
                                            <dt class="refresh-data-icon"></dt>
                                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                        </dl>
                                    </div>

                                    <!--翻页系统--{-->
                                    <div class="container">
                                        <#import "../../common/page.html" as pager>
                                            <@pager.pagination page=page url="/admin/userinfo/invitationUsers.html" map=param style="style1"  />
                                    </div>
                                    <!--翻页系统--}-->
                                </div>
                                <!--底部工具栏--}-->

                                <script>
                            	var urls=window.location.href;
                				var index=urls.indexOf("?");
                				if(index>0){
                				  urls=urls.substring(0,index);
                				 }
                				var xlsurl=urls+"?exportType=export";
                                    function sousuo(){
                                        var sou = "";
                                        var username = $("#username").val();
                                        if (username!=""&&username!=null){
                                            sou += "&username="+username;
                                        }
                                        var invite_username = $("#invite_username").val();
                                        if (invite_username!=""&&invite_username!=null){
                                            sou += "&invite_username="+invite_username;
                                        }
                                        var invite_startTime = $("#invite_startTime").val();
					 					if (invite_startTime!=null&&invite_startTime!=""&&invite_startTime!="undefine"){
					 						sou += "&invite_startTime="+invite_startTime;
					 					}
					 					var invite_endTime = $("#invite_endTime").val();
					 					if (invite_endTime!=null&&invite_endTime!=""&&invite_endTime!="undefine"){
					 						sou += "&invite_endTime="+invite_endTime;
					 					}
                                        location.href=urls+"?search=true"+sou;
                                    }
		
		
									function exportxls(){
										var num='${listsize}';
                    					num=num.replace(",","");
										if(num>60000){
											alert("数据量过多，请选择指定的邀请时间进行数据查询导出！");
											return false;
										}
										var condi = "";
										var username = $("#username").val();
					                    if (username!=""&&username!=null){
					                    	condi += "&username="+username;
					                    }
					                    var invite_username = $("#invite_username").val();
					                    if (invite_username!=""&&invite_username!=null){
					                    	condi += "&invite_username="+invite_username;
					                    }
					                    var invite_startTime = $("#invite_startTime").val();
					 					if (invite_startTime!=null&&invite_startTime!=""&&invite_startTime!="undefine"){
					 						condi += "&invite_startTime="+invite_startTime;
					 					}
					 					var invite_endTime = $("#invite_endTime").val();
					 					if (invite_endTime!=null&&invite_endTime!=""&&invite_endTime!="undefine"){
					 						condi += "&invite_endTime="+invite_endTime;
					 					}
					                    if (condi!=""){
					                    	location.href=xlsurl+condi;
					                    }else{
					                        location.href=xlsurl;
					                    }
									}
                                </script>
                            </div>

            </td>
        </tr>
        <tr>
            <!--尾部--{-->
            <td colspan="3" class="mc-b"><#include "../foot.html"></td>
            <!--尾部--}-->
        </tr>
    </table>

    </body>
</html>
<#include "../jsPage.html">
<!--v1.6.7.2 RDPROJECT-510 cx 2013-12-10 end  -->
